package com.ssy.lingxi.settle.accounts.entity;

import javax.persistence.*;
import java.io.Serializable;

/**
 * 平台结算明细DO
 * @author 伍将
 * @date 2020/10/29
 * @version 2.0.0
 */
@Entity
@Table(schema = "public", name = "sa_platform_settlement_detail",
        indexes = {@Index(name = "sa_platform_settlement_detail_settlement_id_idx", columnList = "settlementId"),
                @Index(name = "sa_platform_settlement_detail_order_time_idx", columnList = "orderTime")})
public class PlatformSettlementDetailDO implements Serializable {

    private static final long serialVersionUID = -4076593528282602609L;

    /**
     * ID
     */
    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "platform_settlement_detail_seq")
    @SequenceGenerator(sequenceName = "sa_platform_settlement_detail_seq", name = "platform_settlement_detail_seq", allocationSize = 1)
    private Long id;

    /**
     * 结算id
     */
    @Column(columnDefinition = "int8")
    private Long settlementId;

    /**
     * 会员id
     */
    @Column(columnDefinition = "int8")
    private Long memberId;

    /**
     * 角色id
     */
    @Column(columnDefinition = "int8")
    private Long roleId;

    /**
     * 单据号
     */
    @Column(columnDefinition = "varchar(50)")
    private String orderNo;

    /**
     * 单据摘要
     */
    @Column(columnDefinition = "varchar(50)")
    private String orderAbstract;

    /**
     * 单据类型:1.生成通知单 2.物流单 3.订单 4.积分订单 5.退货申请单
     */
    @Column(columnDefinition = "int")
    private Integer settlementOrderType;

    /**
     * 单据时间
     */
    @Column(columnDefinition = "int8")
    private Long orderTime;

    /**
     * 订单类型
     */
    @Column(columnDefinition = "int")
    private Integer orderType;

    /**
     * 单据总额
     */
    @Column(columnDefinition = "decimal")
    private Double orderAmount;

    /**
     * 代收金额
     */
    @Column(columnDefinition = "decimal")
    private Double collectAmount;

    /**
     * 支付时间
     */
    @Column(columnDefinition = "int8")
    private Long payTime;

    /**
     * 佣金比例(百分比乘以100之后存储)
     */
    @Column(columnDefinition = "decimal")
    private Double ratio;

    /**
     * 佣金
     */
    @Column(columnDefinition = "decimal")
    private Double brokerage;

    /**
     * 结算金额
     */
    @Column(columnDefinition = "decimal")
    private Double settlementAmount;

    /**
     * 是否含税：CommonBooleanEnum
     */
    @Column(columnDefinition = "int")
    private Integer isHasTax;

    /**
     *  税率
     */
    @Column(columnDefinition = "decimal")
    private Double taxRate;

    @Column(columnDefinition = "int8")
    private Long paymentId;

    /**
     * 在线支付的商户订单号
     */
    @Column(columnDefinition = "varchar(50)")
    private String paymentTradeNo;

    public Integer getIsHasTax() {
        return isHasTax;
    }

    public void setIsHasTax(Integer isHasTax) {
        this.isHasTax = isHasTax;
    }

    public Double getTaxRate() {
        return taxRate;
    }

    public void setTaxRate(Double taxRate) {
        this.taxRate = taxRate;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getMemberId() {
        return memberId;
    }

    public void setMemberId(Long memberId) {
        this.memberId = memberId;
    }

    public Long getRoleId() {
        return roleId;
    }

    public void setRoleId(Long roleId) {
        this.roleId = roleId;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public String getOrderAbstract() {
        return orderAbstract;
    }

    public void setOrderAbstract(String orderAbstract) {
        this.orderAbstract = orderAbstract;
    }

    public Integer getSettlementOrderType() {
        return settlementOrderType;
    }

    public void setSettlementOrderType(Integer settlementOrderType) {
        this.settlementOrderType = settlementOrderType;
    }

    public Long getOrderTime() {
        return orderTime;
    }

    public void setOrderTime(Long orderTime) {
        this.orderTime = orderTime;
    }

    public Integer getOrderType() {
        return orderType;
    }

    public void setOrderType(Integer orderType) {
        this.orderType = orderType;
    }

    public Double getOrderAmount() {
        return orderAmount;
    }

    public void setOrderAmount(Double orderAmount) {
        this.orderAmount = orderAmount;
    }

    public Double getCollectAmount() {
        return collectAmount;
    }

    public void setCollectAmount(Double collectAmount) {
        this.collectAmount = collectAmount;
    }

    public Long getPayTime() {
        return payTime;
    }

    public void setPayTime(Long payTime) {
        this.payTime = payTime;
    }

    public Double getRatio() {
        return ratio;
    }

    public void setRatio(Double ratio) {
        this.ratio = ratio;
    }

    public Double getBrokerage() {
        return brokerage;
    }

    public void setBrokerage(Double brokerage) {
        this.brokerage = brokerage;
    }

    public Double getSettlementAmount() {
        return settlementAmount;
    }

    public void setSettlementAmount(Double settlementAmount) {
        this.settlementAmount = settlementAmount;
    }

    public Long getSettlementId() {
        return settlementId;
    }

    public void setSettlementId(Long settlementId) {
        this.settlementId = settlementId;
    }

    public Long getPaymentId() {
        return paymentId;
    }

    public void setPaymentId(Long paymentId) {
        this.paymentId = paymentId;
    }

    public String getPaymentTradeNo() {
        return paymentTradeNo;
    }

    public void setPaymentTradeNo(String paymentTradeNo) {
        this.paymentTradeNo = paymentTradeNo;
    }
}
